3.4.28 \(\int (d \sec (e+f x))^n \sqrt {a-a \sec (e+f x)} \, dx\) [328]

Optimal. Leaf size=69 \[ \frac {2 a \, _2F_1\left (\frac {1}{2},1-n;\frac {3}{2};1+\sec (e+f x)\right ) (-\sec (e+f x))^{-n} (d \sec (e+f x))^n \tan (e+f x)}{f \sqrt {a-a \sec (e+f x)}} \]

[Out]

2*a*hypergeom([1/2, 1-n],[3/2],1+sec(f*x+e))*(d*sec(f*x+e))^n*tan(f*x+e)/f/((-sec(f*x+e))^n)/(a-a*sec(f*x+e))^
(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.06, antiderivative size = 69, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.115, Rules used = {3891, 69, 67} \begin {gather*} \frac {2 a \tan (e+f x) (-\sec (e+f x))^{-n} (d \sec (e+f x))^n \, _2F_1\left (\frac {1}{2},1-n;\frac {3}{2};\sec (e+f x)+1\right )}{f \sqrt {a-a \sec (e+f x)}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(d*Sec[e + f*x])^n*Sqrt[a - a*Sec[e + f*x]],x]

[Out]

(2*a*Hypergeometric2F1[1/2, 1 - n, 3/2, 1 + Sec[e + f*x]]*(d*Sec[e + f*x])^n*Tan[e + f*x])/(f*(-Sec[e + f*x])^
n*Sqrt[a - a*Sec[e + f*x]])

Rule 67

Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((c + d*x)^(n + 1)/(d*(n + 1)*(-d/(b*c))^m))
*Hypergeometric2F1[-m, n + 1, n + 2, 1 + d*(x/c)], x] /; FreeQ[{b, c, d, m, n}, x] &&  !IntegerQ[n] && (Intege
rQ[m] || GtQ[-d/(b*c), 0])

Rule 69

Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Dist[((-b)*(c/d))^IntPart[m]*((b*x)^FracPart[m]/(
(-d)*(x/c))^FracPart[m]), Int[((-d)*(x/c))^m*(c + d*x)^n, x], x] /; FreeQ[{b, c, d, m, n}, x] &&  !IntegerQ[m]
 &&  !IntegerQ[n] &&  !GtQ[c, 0] &&  !GtQ[-d/(b*c), 0]

Rule 3891

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*Sqrt[csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)], x_Symbol] :> Dist[a^2*d*(
Cot[e + f*x]/(f*Sqrt[a + b*Csc[e + f*x]]*Sqrt[a - b*Csc[e + f*x]])), Subst[Int[(d*x)^(n - 1)/Sqrt[a - b*x], x]
, x, Csc[e + f*x]], x] /; FreeQ[{a, b, d, e, f, n}, x] && EqQ[a^2 - b^2, 0]

Rubi steps

\begin {align*} \int (d \sec (e+f x))^n \sqrt {a-a \sec (e+f x)} \, dx &=-\frac {\left (a^2 d \tan (e+f x)\right ) \text {Subst}\left (\int \frac {(d x)^{-1+n}}{\sqrt {a+a x}} \, dx,x,\sec (e+f x)\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}\\ &=\frac {\left (a^2 (-\sec (e+f x))^{-n} (d \sec (e+f x))^n \tan (e+f x)\right ) \text {Subst}\left (\int \frac {(-x)^{-1+n}}{\sqrt {a+a x}} \, dx,x,\sec (e+f x)\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}\\ &=\frac {2 a \, _2F_1\left (\frac {1}{2},1-n;\frac {3}{2};1+\sec (e+f x)\right ) (-\sec (e+f x))^{-n} (d \sec (e+f x))^n \tan (e+f x)}{f \sqrt {a-a \sec (e+f x)}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C] Result contains complex when optimal does not.
time = 0.59, size = 236, normalized size = 3.42 \begin {gather*} \frac {2^{-\frac {1}{2}+n} e^{-\frac {1}{2} i (e+f (1+2 n) x)} \left (\frac {e^{i (e+f x)}}{1+e^{2 i (e+f x)}}\right )^{\frac {1}{2}+n} \left (1+e^{2 i (e+f x)}\right )^{\frac {1}{2}+n} \csc \left (\frac {e}{2}+\frac {f x}{2}\right ) \left (e^{i f n x} (1+n) \, _2F_1\left (\frac {n}{2},\frac {1}{2}+n;\frac {2+n}{2};-e^{2 i (e+f x)}\right )-e^{i (e+f (1+n) x)} n \, _2F_1\left (\frac {1}{2}+n,\frac {1+n}{2};\frac {3+n}{2};-e^{2 i (e+f x)}\right )\right ) \sec ^{-\frac {1}{2}-n}(e+f x) (d \sec (e+f x))^n \sqrt {a-a \sec (e+f x)}}{f n (1+n)} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(d*Sec[e + f*x])^n*Sqrt[a - a*Sec[e + f*x]],x]

[Out]

(2^(-1/2 + n)*(E^(I*(e + f*x))/(1 + E^((2*I)*(e + f*x))))^(1/2 + n)*(1 + E^((2*I)*(e + f*x)))^(1/2 + n)*Csc[e/
2 + (f*x)/2]*(E^(I*f*n*x)*(1 + n)*Hypergeometric2F1[n/2, 1/2 + n, (2 + n)/2, -E^((2*I)*(e + f*x))] - E^(I*(e +
 f*(1 + n)*x))*n*Hypergeometric2F1[1/2 + n, (1 + n)/2, (3 + n)/2, -E^((2*I)*(e + f*x))])*Sec[e + f*x]^(-1/2 -
n)*(d*Sec[e + f*x])^n*Sqrt[a - a*Sec[e + f*x]])/(E^((I/2)*(e + f*(1 + 2*n)*x))*f*n*(1 + n))

________________________________________________________________________________________

Maple [F]
time = 0.08, size = 0, normalized size = 0.00 \[\int \left (d \sec \left (f x +e \right )\right )^{n} \sqrt {a -a \sec \left (f x +e \right )}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*sec(f*x+e))^n*(a-a*sec(f*x+e))^(1/2),x)

[Out]

int((d*sec(f*x+e))^n*(a-a*sec(f*x+e))^(1/2),x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*sec(f*x+e))^n*(a-a*sec(f*x+e))^(1/2),x, algorithm="maxima")

[Out]

integrate(sqrt(-a*sec(f*x + e) + a)*(d*sec(f*x + e))^n, x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*sec(f*x+e))^n*(a-a*sec(f*x+e))^(1/2),x, algorithm="fricas")

[Out]

integral(sqrt(-a*sec(f*x + e) + a)*(d*sec(f*x + e))^n, x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (d \sec {\left (e + f x \right )}\right )^{n} \sqrt {- a \left (\sec {\left (e + f x \right )} - 1\right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*sec(f*x+e))**n*(a-a*sec(f*x+e))**(1/2),x)

[Out]

Integral((d*sec(e + f*x))**n*sqrt(-a*(sec(e + f*x) - 1)), x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*sec(f*x+e))^n*(a-a*sec(f*x+e))^(1/2),x, algorithm="giac")

[Out]

integrate(sqrt(-a*sec(f*x + e) + a)*(d*sec(f*x + e))^n, x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \sqrt {a-\frac {a}{\cos \left (e+f\,x\right )}}\,{\left (\frac {d}{\cos \left (e+f\,x\right )}\right )}^n \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a - a/cos(e + f*x))^(1/2)*(d/cos(e + f*x))^n,x)

[Out]

int((a - a/cos(e + f*x))^(1/2)*(d/cos(e + f*x))^n, x)

________________________________________________________________________________________